Fixed bug sent directly to me. Basically, we weren't checking a failure
authorMark Crichton <crichton@src.gnome.org>
Thu, 6 Jan 2000 20:19:30 +0000 (20:19 +0000)
committerMark Crichton <crichton@src.gnome.org>
Thu, 6 Jan 2000 20:19:30 +0000 (20:19 +0000)
Fixed bug sent directly to me.  Basically, we weren't checking a failure case
from load_module, and returning junk to the application.  Bad.

See ChangeLog for more info.

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-loader.c
gtk/gdk-pixbuf-loader.c

index cbbaafc85b8052cb4cbc27be156c5a990df6d922..8d6792224a8f84e73602588cc30d74192160931c 100644 (file)
@@ -1,3 +1,8 @@
+2000-01-05  Mark Crichton  <crichton@gimp.org>
+
+       * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write): 
+       Return 0 if gdk_pixbuf_load_loader_module returns FALSE.
+
 2000-01-05 Elliot Lee <sopwith@redhat.com>
        * gdk-pixbuf/pixops/Makefile.am: Link with -lm (to get 'ceil' function)
 
index cd1b91418b16549104a6de0c0f2a8bc96a613c45..69bb7f98ea8659c83b1ec1ea5f8cc058b684a626 100644 (file)
@@ -300,9 +300,10 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
            
        priv->header_buf_offset += nbytes;
            
-       if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
-               gdk_pixbuf_loader_load_module(loader);
-
+       if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
+               if (gdk_pixbuf_loader_load_module(loader) == 0)
+                       return 0;
+       }
        return nbytes;
 }
 
index cd1b91418b16549104a6de0c0f2a8bc96a613c45..69bb7f98ea8659c83b1ec1ea5f8cc058b684a626 100644 (file)
@@ -300,9 +300,10 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
            
        priv->header_buf_offset += nbytes;
            
-       if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
-               gdk_pixbuf_loader_load_module(loader);
-
+       if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
+               if (gdk_pixbuf_loader_load_module(loader) == 0)
+                       return 0;
+       }
        return nbytes;
 }